package com.subfg.common.entity.excpetion;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "统一异常处理!!")
public class BusinessExceptionModel extends Exception implements Serializable {
    @ApiModelProperty(value = "后台返回code")
    private Integer code;
    @ApiModelProperty(value = "后台返回提示")
    private String message;

    public BusinessExceptionModel(String message){
        this.code = -1;
        this.message = message;
    }



}
